package com.zhenhao.xsq.ui.activity.camera.module;


import com.zhenhao.xsq.data.api.HttpAPIWrapper;
import com.zhenhao.xsq.ui.activity.base.ActivityScope;
import com.zhenhao.xsq.ui.activity.camera.CameraPlayActivity;
import com.zhenhao.xsq.ui.activity.camera.contract.CameraPlayContract;
import com.zhenhao.xsq.ui.activity.camera.presenter.CameraPlayPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author xlei
 * @Package com.yxld.gb.xsq.ui.activity.camera
 * @Description: The moduele of CameraPlayActivity, provide field for CameraPlayActivity
 * @date 2019/04/28 14:28:03
 */
@Module
public class CameraPlayModule {
    private final CameraPlayContract.View mView;


    public CameraPlayModule(CameraPlayContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public CameraPlayPresenter provideCameraPlayPresenter(HttpAPIWrapper httpAPIWrapper, CameraPlayActivity mActivity) {
        return new CameraPlayPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public CameraPlayActivity provideCameraPlayActivity() {
        return (CameraPlayActivity) mView;
    }
}